USE [aircond]
GO

/****** Object:  Table [dbo].[FLOOR]    Script Date: 03/15/2013 00:05:07 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[FLOOR](
	[FLOOR_ID] [numeric](19, 0) IDENTITY(1,1) NOT NULL,
	[createDate] [datetime] NULL,
	[createUser] [varchar](255) NULL,
	[updateDate] [datetime] NULL,
	[updateUser] [varchar](255) NULL,
	[version] [int] NOT NULL,
	[description] [varchar](255) NULL,
	[floorName] [varchar](255) NULL,
	[floorNo] [int] NOT NULL,
	[floorType] [varchar](255) NULL,
	[status] [varchar](255) NULL,
	[BUILDING_ID] [numeric](19, 0) NULL,
	[floorPlan_FLOOR_PLAN_ID] [numeric](19, 0) NULL,
PRIMARY KEY CLUSTERED 
(
	[FLOOR_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[FLOOR]  WITH CHECK ADD  CONSTRAINT [FK3FE2BEC22D21BA7] FOREIGN KEY([BUILDING_ID])
REFERENCES [dbo].[BUILDING] ([BUILDING_ID])
GO

ALTER TABLE [dbo].[FLOOR] CHECK CONSTRAINT [FK3FE2BEC22D21BA7]
GO

ALTER TABLE [dbo].[FLOOR]  WITH CHECK ADD  CONSTRAINT [FK3FE2BEC500377BC] FOREIGN KEY([floorPlan_FLOOR_PLAN_ID])
REFERENCES [dbo].[FLOOR_PLAN] ([FLOOR_PLAN_ID])
GO

ALTER TABLE [dbo].[FLOOR] CHECK CONSTRAINT [FK3FE2BEC500377BC]
GO

